3.1.33 \(\int \frac {\log (c (a+\frac {b}{x})^p)}{x^3} \, dx\) [33]

Optimal. Leaf size=59 \[ \frac {p}{4 x^2}-\frac {a p}{2 b x}+\frac {a^2 p \log \left (a+\frac {b}{x}\right )}{2 b^2}-\frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{2 x^2} \]

[Out]

1/4*p/x^2-1/2*a*p/b/x+1/2*a^2*p*ln(a+b/x)/b^2-1/2*ln(c*(a+b/x)^p)/x^2

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {2504, 2442, 45} \begin {gather*} \frac {a^2 p \log \left (a+\frac {b}{x}\right )}{2 b^2}-\frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{2 x^2}-\frac {a p}{2 b x}+\frac {p}{4 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[c*(a + b/x)^p]/x^3,x]

[Out]

p/(4*x^2) - (a*p)/(2*b*x) + (a^2*p*Log[a + b/x])/(2*b^2) - Log[c*(a + b/x)^p]/(2*x^2)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rubi steps

\begin {align*} \int \frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{x^3} \, dx &=-\text {Subst}\left (\int x \log \left (c (a+b x)^p\right ) \, dx,x,\frac {1}{x}\right )\\ &=-\frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{2 x^2}+\frac {1}{2} (b p) \text {Subst}\left (\int \frac {x^2}{a+b x} \, dx,x,\frac {1}{x}\right )\\ &=-\frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{2 x^2}+\frac {1}{2} (b p) \text {Subst}\left (\int \left (-\frac {a}{b^2}+\frac {x}{b}+\frac {a^2}{b^2 (a+b x)}\right ) \, dx,x,\frac {1}{x}\right )\\ &=\frac {p}{4 x^2}-\frac {a p}{2 b x}+\frac {a^2 p \log \left (a+\frac {b}{x}\right )}{2 b^2}-\frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{2 x^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 59, normalized size = 1.00 \begin {gather*} \frac {p}{4 x^2}-\frac {a p}{2 b x}+\frac {a^2 p \log \left (a+\frac {b}{x}\right )}{2 b^2}-\frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{2 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(a + b/x)^p]/x^3,x]

[Out]

p/(4*x^2) - (a*p)/(2*b*x) + (a^2*p*Log[a + b/x])/(2*b^2) - Log[c*(a + b/x)^p]/(2*x^2)

________________________________________________________________________________________

Maple [F]
time = 0.04, size = 0, normalized size = 0.00 \[\int \frac {\ln \left (c \left (a +\frac {b}{x}\right )^{p}\right )}{x^{3}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(a+b/x)^p)/x^3,x)

[Out]

int(ln(c*(a+b/x)^p)/x^3,x)

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 63, normalized size = 1.07 \begin {gather*} \frac {1}{4} \, b p {\left (\frac {2 \, a^{2} \log \left (a x + b\right )}{b^{3}} - \frac {2 \, a^{2} \log \left (x\right )}{b^{3}} - \frac {2 \, a x - b}{b^{2} x^{2}}\right )} - \frac {\log \left ({\left (a + \frac {b}{x}\right )}^{p} c\right )}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(a+b/x)^p)/x^3,x, algorithm="maxima")

[Out]

1/4*b*p*(2*a^2*log(a*x + b)/b^3 - 2*a^2*log(x)/b^3 - (2*a*x - b)/(b^2*x^2)) - 1/2*log((a + b/x)^p*c)/x^2

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 55, normalized size = 0.93 \begin {gather*} -\frac {2 \, a b p x - b^{2} p + 2 \, b^{2} \log \left (c\right ) - 2 \, {\left (a^{2} p x^{2} - b^{2} p\right )} \log \left (\frac {a x + b}{x}\right )}{4 \, b^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(a+b/x)^p)/x^3,x, algorithm="fricas")

[Out]

-1/4*(2*a*b*p*x - b^2*p + 2*b^2*log(c) - 2*(a^2*p*x^2 - b^2*p)*log((a*x + b)/x))/(b^2*x^2)

________________________________________________________________________________________

Sympy [A]
time = 0.79, size = 61, normalized size = 1.03 \begin {gather*} \begin {cases} \frac {a^{2} \log {\left (c \left (a + \frac {b}{x}\right )^{p} \right )}}{2 b^{2}} - \frac {a p}{2 b x} + \frac {p}{4 x^{2}} - \frac {\log {\left (c \left (a + \frac {b}{x}\right )^{p} \right )}}{2 x^{2}} & \text {for}\: b \neq 0 \\- \frac {\log {\left (a^{p} c \right )}}{2 x^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(a+b/x)**p)/x**3,x)

[Out]

Piecewise((a**2*log(c*(a + b/x)**p)/(2*b**2) - a*p/(2*b*x) + p/(4*x**2) - log(c*(a + b/x)**p)/(2*x**2), Ne(b,
0)), (-log(a**p*c)/(2*x**2), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 150 vs. \(2 (51) = 102\).
time = 4.26, size = 150, normalized size = 2.54 \begin {gather*} \frac {\frac {4 \, {\left (a x + b\right )} a p \log \left (-b {\left (\frac {a}{b} - \frac {a x + b}{b x}\right )} + a\right )}{b x} - \frac {4 \, {\left (a x + b\right )} a p}{b x} - \frac {2 \, {\left (a x + b\right )}^{2} p \log \left (-b {\left (\frac {a}{b} - \frac {a x + b}{b x}\right )} + a\right )}{b x^{2}} + \frac {4 \, {\left (a x + b\right )} a \log \left (c\right )}{b x} + \frac {{\left (a x + b\right )}^{2} p}{b x^{2}} - \frac {2 \, {\left (a x + b\right )}^{2} \log \left (c\right )}{b x^{2}}}{4 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(a+b/x)^p)/x^3,x, algorithm="giac")

[Out]

1/4*(4*(a*x + b)*a*p*log(-b*(a/b - (a*x + b)/(b*x)) + a)/(b*x) - 4*(a*x + b)*a*p/(b*x) - 2*(a*x + b)^2*p*log(-
b*(a/b - (a*x + b)/(b*x)) + a)/(b*x^2) + 4*(a*x + b)*a*log(c)/(b*x) + (a*x + b)^2*p/(b*x^2) - 2*(a*x + b)^2*lo
g(c)/(b*x^2))/b

________________________________________________________________________________________

Mupad [B]
time = 0.34, size = 53, normalized size = 0.90 \begin {gather*} \frac {\frac {p}{2}-\frac {a\,p\,x}{b}}{2\,x^2}-\frac {\ln \left (c\,{\left (a+\frac {b}{x}\right )}^p\right )}{2\,x^2}+\frac {a^2\,p\,\mathrm {atanh}\left (\frac {2\,a\,x}{b}+1\right )}{b^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(a + b/x)^p)/x^3,x)

[Out]

(p/2 - (a*p*x)/b)/(2*x^2) - log(c*(a + b/x)^p)/(2*x^2) + (a^2*p*atanh((2*a*x)/b + 1))/b^2

________________________________________________________________________________________